#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1e4+10;
char s[maxn];
int main()
{
	int t;
	scanf("%d",&t);
	while(t--)
	{
		int n0,n1,n2;
		int cnt = 0;
		scanf("%d %d %d",&n0,&n1,&n2);
		for(int i = 0;i<n0+1&&n0!=0;i++)
		{
			s[cnt++] = '0';
		}
		if(cnt!=0&&n1!=0)
		{
			s[cnt++] = '1';
			n1--;
		}
		if(cnt==0) n2++;
		for(int i = 0;i<n2;i++)
		{
			s[cnt++] = '1';
		}
		if(cnt==0) n1++;
		for(int i = 0;i<n1;i++)
		{
			if(i%2) s[cnt++] = '1';
			else s[cnt++] = '0';
		}
		s[cnt] = 0;
		puts(s);
	}
} 
